It has been known that the reliability of a semiconductor device is degraded due to a variation in characteristics caused by charge included in an insulating film. When the semiconductor device is operating or is in a standby state, charge included in the insulating film moves in the semiconductor device and causes a variation in the breakdown voltage of the semiconductor device or a variation in leakage current.